package com.gexin.model;
import java.util.HashMap;
import java.util.Map;

import com.gexin.common.generator.GeneratorMain;
//import com.gexin.common.generator_v3.GeneratorMain;
import com.jfinal.kit.PathKit;
/**
 * 代码生成器  
 * @author 肖得明
 *
 */
public class _GeneratorCode {
	
    public static Map<String, String> packmap = new HashMap<String, String>();
	public static Map<String, Object> map = new HashMap<String, Object>();
	public static Map<String, String> delmap = new HashMap<String, String>();
    public  static final String  Config_File_Name="gexin_config_debug.txt";  //数据源的文件
    public static String _packageName="com.gexin.model";  //输出的包名
    public static String _baseModelPackageName = "com.gexin.model.base";// base model 所使用的包名
    public static String _ModelOutputDir = PathKit.getWebRootPath()+ "/../java/com/gexin/model/";  //输出的路径
    public static String _BaseModelOutputDir=_ModelOutputDir+"base/";
    static{



    	map.put("t_agent_product_sku","agent");
        //表名，对应模块的名字  如果为空  就不用输入
        map.put("t_admin_res", "system");
        map.put("t_admin_role", "system");
        map.put("t_admin_role_res", "system");
        map.put("t_admin_user_role", "system");
        map.put("t_admin_user", "system");
        map.put("t_admin_log", "system");  //系统日志
        map.put("t_admin_dict", "system");  //系统日志
        map.put("t_admin_config", "system");  //系统配置信息

		//地址表
		map.put("t_addr_areas","system");
		map.put("t_addr_cities","system");
		map.put("t_addr_provinces","system");



		map.put("t_file_info", "plug"); // 文件
		map.put("t_file_tag", "plug"); // 文件标签

		map.put("t_weixin_user", "weixin"); //微信用户
		map.put("t_weixin_gzh_user", "weixin"); //微信公众号用户
		map.put("t_weixin_app_config", "weixin"); //微信Appid配置信息表
		map.put("t_wx_menu","weixin");//微信自定义菜单
		map.put("t_user_address","weixin");//微信自定义菜单
		map.put("t_user_evaluation","weixin");//微信自定义菜单
		map.put("t_weixin_user_coupon","weixin");//用户积分表

		//店铺配置表
		map.put("t_advertising","config");//广告位
		map.put("t_banner","config");//广告位
		//活动表
		map.put("t_free_acquire","activity");
		map.put("t_coupon","activity");
		map.put("t_integral_item","activity");

		//代理商表
		map.put("t_agent","agent");
		map.put("t_agent_city","agent");
		map.put("t_agent_level","agent");
		map.put("t_agent_account_log","agent");
		map.put("t_agent_price_log","agent");
		//积分相关表
		map.put("t_user_integral_record","integral");
		map.put("t_sign_in","integral");
		//通知管理表
		map.put("t_notice_news","notice");
		map.put("t_notice_news_comment","notice");
		map.put("t_notice_news_comment_reply","notice");
		map.put("t_notice_placard","notice");
		map.put("t_notice_type","notice");
		map.put("t_notice_zan","notice");//用户收藏商品表

		map.put("t_shop_info","shop");//店铺信息表
		map.put("t_shop_file_tag","shop");//店铺文件标签
		map.put("t_shop_file","shop");//店铺文件表

		//商城模块
		map.put("t_product_type", "product");  //商品类型
		map.put("t_product", "product");   //商铺信息表
		map.put("t_products", "product");   //商铺信息表
		map.put("t_product_order", "product");   //商品订单表
		map.put("t_product_discount_code", "product");   //商品兑换码
		map.put("t_product_sku_attr", "product");   //商品SKU属性
		map.put("t_product_sku", "product");   //商品SKU属性
		map.put("t_product_card_stock", "product");//虚拟物品的库存
		map.put("t_product_order_state","order");
		map.put("t_product_index_config","product");
		map.put("t_product_sku_key", "product");   //商品SKU属性
		map.put("t_product_sku_value", "product");   //商品SKU属性
		map.put("t_product_tag", "product");   //商品标签
		map.put("t_product_tag_rel", "product");   //商品标签关联
		map.put("t_product_flow_count", "product");   //商品标签关联
		map.put("t_product_wx_news", "product");   //微信图文消息

		//订单状态
		map.put("t_order", "order");//主订单表
		map.put("t_order_cart", "order");//购物车订单
		map.put("t_order_item", "order");//订单商品信息
		map.put("t_order_item_evaluate", "order");//订单商品评价表
		map.put("t_order_state", "order");//订单状态
		map.put("t_order_refund", "order");//订单退款
		map.put("t_order_refund_apply", "order");//订单商品申请退款
		map.put("t_order_group", "order");//拼团订单表
		map.put("t_order_express", "order");//订单物流记录表
		map.put("t_order_sum","order");//订单统计表
		map.put("t_order_presale","order");//订单统计表
		map.put("t_order_invoice","order");//订单统计表

		//物流模版
		map.put("t_template_area", "template");
		map.put("t_template_num", "template");
		map.put("t_template_wuliu", "template");
		map.put("t_template_wuliu_item", "template");

		//用户
		map.put("t_user_account","user");//账户金额信息
		map.put("t_user_account_log","user");//账户日志表
		map.put("t_user_account_trade_type","user");//交易类型表
		map.put("t_user_check_in","user");//用户签到表
		map.put("t_user_coupon","user");//用户优惠劵表
		map.put("t_user_integral_log","user");//用户积分日志表
		map.put("t_user_collect","user");//用户收藏商品表
		map.put("t_feedback","user");//用户反馈表
		map.put("t_user_rebate","user");//用户返利表
		map.put("t_promo_code","promo");//兑换码活动码库表
		map.put("t_promo_info","promo");//兑换码活动信息表
		map.put("t_promotional","promo");//商家优惠劵活动发布表
		map.put("t_cashback","activity");
		map.put("t_cashback_balance_num","activity");

		map.put("t_general_integral_speed_rule","activity");
		map.put("t_integral_pool","activity");

 		map.put("t_invitee_relative","activity");
 		map.put("t_invitee_rule","activity");

		map.put("t_reverse_multiple_rule","activity");
		map.put("t_member_info","activity");
		map.put("t_member_integral_coin_rule","activity");
		map.put("t_member_integral_log","activity");
		map.put("t_product_integral_rule","activity");
		map.put("t_member_commision_log","activity");
		map.put("t_range_proportion","activity");
		map.put("t_cash_coupon_log","activity");
		map.put("t_member_level","activity");
		map.put("t_member_bill_speed_integral","activity");
		map.put("t_integral_reward_region","activity");
		map.put("t_member_product_integral_region","activity");
		map.put("t_member_product_integral_rule","activity");
		map.put("t_group_rule","activity");
		map.put("t_member_order_integral","activity");
		map.put("t_member_product_integral","activity");
		map.put("t_member_bill_shop_log","activity");
		map.put("t_member_cash_coupon_log","activity");
		map.put("t_member_order","activity");

		map.put("t_member_commission","activity");
		map.put("t_member_coin_log","activity");
		map.put("t_app_store","activity");
		map.put("t_app_store_url","activity");
		map.put("t_member_order_integral_status","activity");
		map.put("t_company","activity");
		map.put("t_company_coin","activity");
		map.put("t_company_reserve","activity");
		map.put("t_vistor_order","activity");
		map.put("t_vistor_integral_log","activity");

//		map.put("t_member_cash_coupon_log","activity");
//		map.put("t_instmt_quartz","activity");
		//不包括哪些表
       //delmap.put("t_wxuser", "t_wxuser");
        delmap.put("t_account", "t_account");

	}
 
    public static void main(String[] args) {
    	GeneratorMain g =new GeneratorMain(map,packmap,delmap,Config_File_Name,_packageName,_baseModelPackageName,_ModelOutputDir,_BaseModelOutputDir);
		g.gnerator();
	}
}
